# 代码所有：cxw
# 开发时间：2021/11/13 22:27

# import json
# filname="111.json"
# try:
#     with open(filname) as files_read:
#         user_name = json.load(files_read)
# except FileNotFoundError:
#     users = input("输入你的名字，将会存储你的名字在users.json中")
#     with open(filname) as files_w:
#         json.dump(users,files_w)
#     print("文件找不到，谢谢，请检查文件路径")
# else:
#     print(user_name)

# import json
# files="wusersname.json"
# try:
#     with open(files) as f_ob:
#         username = json.load(f_ob)
# except FileNotFoundError:
#     uses=input("请输入你的名字")
#     with open(files,"w") as f_obj:
#         json.dump(uses,f_obj)
#         print("we ",uses)
# else:
#     print(username)

import json
def greet():
    filename="uses.json"
    try:
        with open(filename) as file_ob:
            users=json(file_ob)
    except FileNotFoundError:
        username=input("请输入你的名字：")
        with open(filename,"w") as file_obj:
            json.dump(username,file_obj)
        print("我们将会记住你，并且返回你 ",username)
    else:
        print(users)

